package com.googlecode.curvedmetromaps.core.model;

/**
 * A model of a MetroStation, with a geographic and distorted location.
 */
public class MetroStation {
	/**
	 * Unique station ID in the context of a metro map. The id is in the range
	 * 0..m-1, where m is the number of stations.
	 */
	public int				id;
	/** Geographical location. */
	public float			geoX, geoY;
	/** Distorted output location. */
	public float			x, y;
	/** Number of connected stations. */
	public int				degree;
	/** An optional external id or tag. */
	public String			ref;
	/** Adjacent metro stations. */
	public MetroStation[]	adj;
	/** TEMP rendering vector */
	public float bsX, bsY;

	/**
	 * Instantiates station model at a geographical location.
	 * @param geoX Geographical x coordinate
	 * @param geoY Geographical y coordinate
	 */
	public MetroStation(float geoX, float geoY) {
		this.geoX = geoX;
		this.geoY = geoY;
		this.x = geoX;
		this.y = geoY;
	}

	/**
	 * Instantiates station model at a geographical location and sets ref.
	 * @param geoX Geographical x coordinate
	 * @param geoY Geographical y coordinate
	 * @param ref An external identifier, for example the OSM XML node id.
	 */
	public MetroStation(float geoX, float geoY, String ref) {
		this(geoX, geoY);
		this.ref = ref;
	}
}
